Simplify the interface into httpserver and UnixHttpServer -- the root and
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Fri, 10 Mar 2006 10:44:03 +0000 (11:44 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Fri, 10 Mar 2006 10:44:03 +0000 (11:44 +0100)
commitc785b4684eadb7c03313969d8165d471b71fdc9d
treea8cb7be69371774304da513c01acc1860dfd80a6
parent95c4e70768deafad3d99346cf0533636f909a13c
Simplify the interface into httpserver and UnixHttpServer -- the root and
interface parameters are always used, so there's no need for them to be named
parameters with defaults.

Remove unused httpserver.getRoot and getPort, and simplify the main request
loop.  This means that socket errors do not have to be squelched.

Coalesce the two identical bind methods, one in UnixHttpServer, one in
UnixListener.  Fix this bind method to set the permissions on the socket
explicitly.  This closes a security hole, and fixes the intermittent failure
of xm-test/06_list_nonroot.test.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/web/httpserver.py
tools/python/xen/web/unix.py
tools/python/xen/xend/server/SrvServer.py